<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>XMLHttpRequest</h1>
	</body>

	<script type="text/javascript">
		let request = new XMLHttpRequest();
		let url = 'data.json';

		request.responseType = 'json';

		// 因为同级	
		request.open('GET', url);

		request.onload = function() {
			console.log(request.response, typeof request.response);
		}

		request.send();
	</script>

</html>
